<?php
/** Mirror of the Contact class in java
 */
class Contact {
    private $contactId;
    private $uniqueHash;
    private $firstName;
    private $lastName;
    private $companyName;
    private $email;
    private $primaryPhone;
    private $addressLine1;
    private $addressLine2;
    private $city;
    private $stateProvinceCode;
    private $postalCode;
    private $zipCode5;
    private $countryCode;
    private $fax;
    private $homePhone;
    private $cellPhone;
    private $businessPhone;
    private $generic0;
    private $generic1;
    private $generic2;
    private $generic3;
    private $generic4;
    private $generic5;
    private $generic6;
    private $generic7;
    private $generic8;
    private $generic9;
    private $ownerId;

    // default minimal constructor
    public function __construct($uniqueHash, $ownerId) {
        if(!is_string($uniqueHash) || !is_int($ownerId))
            throw new Exception('Contact: invalid data type passed in object constructor');
        $this->uniqueHash = $uniqueHash;
        $this->ownerId = $ownerId;
    }

    // Getters
    public function getContactId() {
        return $this->contactId;
    }
    
    public function getUniqueHash() {
        return $this->uniqueHash;
    }
    
    public function getFirstName() {
        return $this->firstName;
    }
    
    public function getLastName() {
        return $this->lastName;
    }
    
    public function getCompanyName() {
        return $this->companyName;
    }
    
    public function getEmail() {
        return $this->email;
    }
    
    public function getPrimaryPhone() {
        return $this->primaryPhone;
    }
    
    public function getAddressLine1() {
        return $this->addressLine1;
    }
    
    public function getAddressLine2() {
        return $this->addressLine2;
    }
    
    public function getCity() {
        return $this->city;
    }
    
    public function getStateProvinceCode() {
        return $this->stateProvineCode();
    }
    
    public function getPostalCode() {
        return $this->postalCode;
    }
    
    public function getZipCode5() {
        return $this->zipCode5;
    }
    
    public function getCountryCode() {
        return $this->countryCode;
    }
    
    public function getFax() {
        return $this->fax;
    }
    
    public function getHomePhone() {
        return $this->homePhone;
    }
    
    public function getCellPhone() {
        return $this->cellPhone;
    }
    
    public function getBusinessPhone() {
        return $this->businessPhone;
    }
    
    public function getGeneric0() {
        return $this->generic0;
    }
    
    public function getGeneric1() {
        return $this->generic1;
    }
    
    public function getGeneric2() {
        return $this->generic2;
    }
    
    public function getGeneric3() {
        return $this->generic3;
    }
    
    public function getGeneric4() {
        return $this->generic4;
    }
    
    public function getGeneric5() {
        return $this->generic5;
    }
    
    public function getGeneric6() {
        return $this->generic6;
    }
    
    public function getGeneric7() {
        return $this->generic7;
    }
    
    public function getGeneric8() {
        return $this->generic8;
    }
    
    public function getGeneric9() {
        return $this->generic9;
    }
    
    public function getOwnerId() {
        return $this->ownerId;
    }
    
    // Setters
    public function setContactId($int) {
        if(!is_int($int)) {
            throw new Exception('Contact::setContactId: invalid data type passed');
        }
        $this->contactId = $int;
    }
    
    public function setUniqueHash($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setUniqueHash: invalid data type passed');
        }
        $this->uniqueHash = $str;
    }
    
    public function setFirstName($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setFirstName: invalid data type passed');
        }
        $this->firstName = $str;
    }
    
    public function setLastName($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setLastName: invalid data type passed');
        }
        $this->lastName = $str;
    }
    
    public function setCompanyName($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setCompanyName: invalid data type passed');
        }
        $this->companyName = $str;
    }
    
    public function setEmail($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setEmail: invalid data type passed');
        }
        $this->email = $str;
    }
    
    public function setPrimaryPhone($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setPrimaryPhone: invalid data type passed');
        }
        $this->primaryPhone = $str;
    }
    
    public function setAddressLine1($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setAddressLine1: invalid data type passed');
        }
        $this->addressLine1 = $str;
    }
    
    public function setAddressLine2($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setAddressLine2: invalid data type passed');
        }
        $this->addressLine2 = $str;
    }
    
    public function setCity($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setCity: invalid data type passed');
        }
        $this->city = $str;
    }
    
    public function setStateProvinceCode($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setStateProvinceCode: invalid data type passed');
        }
        $this->stateProvinceCode = $str;
    }
    
    public function setPostalCode($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setPostalCode: invalid data type passed');
        }
        $this->postalCode = $str;
    }
    
    public function setZipCode5($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setZipCode5: invalid data type passed');
        }
        $this->zipCode5 = $str;
    }
    
    public function setCountryCode($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setCountryCode: invalid data type passed');
        }
        $this->countryCode = $str;
    }
    
    public function setFax($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setFax: invalid data type passed');
        }
        $this->fax = $str;
    }
    
    public function setHomePhone($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setHomePhone: invalid data type passed');
        }
        $this->homePhone = $str;
    }
    
    public function setCellPhone($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setCellPhone: invalid data type passed');
        }
        $this->cellPhone = $str;
    }
    
    public function setBusinessPhone($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setBusinessPhone: invalid data type passed');
        }
        $this->businessPhone = $str;
    }
    
    public function setGeneric0($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setGeneric0: invalid data type passed');
        }
        $this->generic0 = $str;
    }
    
    public function setGeneric1($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setGeneric1: invalid data type passed');
        }
        $this->generic1 = $str;
    }
    
    public function setGeneric2($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setGeneric2: invalid data type passed');
        }
        $this->generic2 = $str;
    }
    
    public function setGeneric3($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setGeneric3: invalid data type passed');
        }
        $this->generic3 = $str;
    }
    
    public function setGeneric4($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setGeneric4: invalid data type passed');
        }
        $this->generic4 = $str;
    }
    
    public function setGeneric5($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setGeneric5: invalid data type passed');
        }
        $this->generic5 = $str;
    }
    
    public function setGeneric6($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setGeneric6: invalid data type passed');
        }
        $this->generic6 = $str;
    }
    
    public function setGeneric7($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setGeneric7: invalid data type passed');
        }
        $this->generic7 = $str;
    }
    
    public function setGeneric8($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setGeneric8: invalid data type passed');
        }
        $this->generic8 = $str;
    }
    
    public function setGeneric9($str) {
        if(!is_string($str)) {
            throw new Exception('Contact::setGeneric9: invalid data type passed');
        }
        $this->generic9 = $str;
    }
    
    public function setOwnerId($int) {
        if(!is_int($int)) {
            throw new Exception('Contact::setOwnerId: invalid data type passed');
        }
        $this->ownerId = $int;
    }
}
?>
